#!/usr/local/bin/python3

import sys
import getopt
# import pdb

# pdb.set_trace()


def help():
    print("%s -i <source> -o <output>" % sys.argv[0])


source = ''
output = ''

if len(sys.argv) == 1:
    help()
    sys.exit(1)

try:
    opts, args = getopt.getopt(sys.argv[1:], 'hi:o:', ["source=", "output="])
except getopt.GetoptError:
    print("%s -i <source> -o <output>" % sys.argv[0])
    sys.exit(2)

for opt, val in opts:
    if opt == '-h':
        print("%s -i <source> -o <output>" % sys.argv[0])
        sys.exit()
    elif opt in ("-i", "--source"):
        source = val
        print(source)
    elif opt in ("-o", "--output"):
        output = val
        print(output)
